package org.nerve.tinker.rpc.bean;


import org.nerve.tinker.rpc.TinkerResponse;

/**
 * 简化MailResponse的属性（有Thrift自动生成的Bean有一些额外的属性，使用JSON进行序列号时不需要）
 * com.zeus.rpc.mail.bean
 * Created by zengxm on 2016/2/26 0026.
 */
public class SimpleTerminalResponse {
	private String id;
	private String data;
	private boolean success;
	private String code;
	private String message;
	private boolean encode;

	public SimpleTerminalResponse(TinkerResponse mr){
		if(mr!=null){
			id=mr.getId();
			data=mr.getData();
			message=mr.getMessage();
			success=mr.isSuccess();
			code=mr.getCode();
		}
	}

	public String getId() {
		return id;
	}

	public SimpleTerminalResponse setId(String id) {
		this.id = id;
		return this;
	}

	public String getData() {
		return data;
	}

	public SimpleTerminalResponse setData(String data) {
		this.data = data;
		return this;
	}

	public boolean isSuccess() {
		return success;
	}

	public SimpleTerminalResponse setSuccess(boolean success) {
		this.success = success;
		return this;
	}

	public String getCode() {
		return code;
	}

	public SimpleTerminalResponse setCode(String code) {
		this.code = code;
		return this;
	}

	public String getMessage() {
		return message;
	}

	public SimpleTerminalResponse setMessage(String message) {
		this.message = message;
		return this;
	}

	public boolean isEncode() {
		return encode;
	}

	public SimpleTerminalResponse setEncode(boolean encode) {
		this.encode = encode;
		return this;
	}
}
